package com.crane.oss.enums;

/**
 * 班级类型
 * 
 * @author tyh
 *
 */
public enum HomeWorkStatusEnum {
	
	STATUS_0(0, "进行中"),
	STATUS_1(1, "已结束"),
	STATUS_2(2, "已发布");

	private Integer type;

	private String remark;

	private HomeWorkStatusEnum(Integer type, String remark) {
		this.type = type;
		this.remark = remark;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public static String getRemark(Integer type) {
		for (HomeWorkStatusEnum statusEnum : HomeWorkStatusEnum.values()) {
			if (statusEnum.getType().equals(type)) {
				return statusEnum.getRemark();
			}
		}
		return "";
	}
	
	public static void main(String[] args) {
		System.err.println(HomeWorkStatusEnum.getRemark(0));
	}
}
